---
title: Browserbase MCP
description: Control browsers with natural language through Browserbase's cloud infrastructure.
keywords:
  [
    Jan,
    MCP,
    Model Context Protocol,
    Browserbase,
    browser automation,
    web scraping,
    Stagehand,
    headless browser,
    tool calling,
  ]
---

import { Callout, Steps } from 'nextra/components'

# Browserbase MCP

[Browserbase MCP](https://docs.browserbase.com/integrations/mcp/introduction) gives AI models actual browser control through cloud infrastructure. Built on Stagehand, it lets you navigate websites, extract data, and interact with web pages using natural language commands.

The integration provides real browser sessions that AI can control, enabling tasks that go beyond simple web search APIs.

## Available Tools

<Callout type="info">
Browserbase's MCP tools evolve over time. This list reflects current capabilities but may change.
</Callout>

### Multi-Session Tools
- `multi_browserbase_stagehand_session_create`: Create parallel browser sessions
- `multi_browserbase_stagehand_session_list`: Track active sessions
- `multi_browserbase_stagehand_session_close`: Clean up sessions
- `multi_browserbase_stagehand_navigate_session`: Navigate in specific session

### Core Browser Actions
- `browserbase_stagehand_navigate`: Navigate to URLs
- `browserbase_stagehand_act`: Perform actions ("click the login button")
- `browserbase_stagehand_extract`: Extract text content
- `browserbase_stagehand_observe`: Find page elements
- `browserbase_screenshot`: Capture screenshots

### Session Management
- `browserbase_session_create`: Create or reuse sessions
- `browserbase_session_close`: Close active sessions

## Prerequisites

- Jan with MCP enabled
- Browserbase account (includes 60 minutes free usage)
- Model with strong tool calling support
- Node.js installed

<Callout type="warning">
Currently, only the latest Anthropic models handle multiple tools reliably. Other models may struggle with the full tool set.
</Callout>

## Setup

### Enable MCP

1. Go to **Settings** > **MCP Servers**
2. Toggle **Allow All MCP Tool Permission** ON

![MCP settings page with toggle enabled](../../_assets/mcp-on.png)

### Get Browserbase Credentials

1. Sign up at [browserbase.com](https://browserbase.com)
   - Email verification required
   - Phone number authentication
   - Thorough security process

2. Access your dashboard and copy:
   - **API Key** 
   - **Project ID**

![Browserbase dashboard showing API key and project ID](../../_assets/browserbase.png)

### Configure MCP Server

Click `+` in MCP Servers section:

**NPM Package Configuration:**
- **Server Name**: `browserbase`
- **Command**: `npx`
- **Arguments**: `@browserbasehq/mcp-server-browserbase`
- **Environment Variables**:
  - Key: `BROWSERBASE_API_KEY`, Value: `your-api-key`
  - Key: `BROWSERBASE_PROJECT_ID`, Value: `your-project-id`

![Jan MCP server configuration with Browserbase settings](../../_assets/browserbase3.png)

### Verify Setup

Check the tools bubble in chat to confirm Browserbase tools are available:

![Chat interface showing available Browserbase tools](../../_assets/browserbase2.png)

## Real Usage Example

### Live Information Query

```
Which sports matches are happening right now in Australia (irrespective of the sport)?
```

This simple query demonstrates browser automation in action:

1. **Tool Activation**
   - Model creates browser session
   - Navigates to sports websites
   - Extracts current match data

![Model using browser tools to search for information](../../_assets/browserbase5.png)

2. **Results Delivery**
   - Real-time match information
   - Multiple sports covered
   - Current scores and timings

![Final response with Australian sports matches](../../_assets/browserbase6.png)

The AI successfully found:
- AFL matches with live scores
- NRL games in progress
- Upcoming Rugby Union fixtures

## Common Issues

### Tool Call Failures

Sometimes tool calls fail due to parsing issues:

![Tool call error showing parsing problem](../../_assets/browserbase7.png)

**Solutions:**
- Try rephrasing your prompt
- Disable unnecessary tools
- Use simpler, more direct requests
- Switch to Claude 3.5+ Sonnet if using another model

### Model Limitations

Most models struggle with multiple tools. If experiencing issues:
- Start with single-purpose requests
- Build complexity gradually
- Consider which tools are actually needed
- Expect some trial and error initially

## Usage Limits

**Free Tier:**
- 60 minutes of browser time included
- Sessions auto-terminate after 5 minutes inactivity
- Can adjust timeout in Browserbase dashboard
- Usage visible in dashboard analytics

**Session Management:**
- Each browser session counts against time
- Close sessions when done to conserve minutes
- Multi-session operations consume time faster

## Practical Use Cases

### Real-Time Data Collection
```
Check current prices for MacBook Pro M4 at major Australian retailers and create a comparison table.
```

### Form Testing
```
Navigate to myservice.gov.au and walk through the Medicare claim process, documenting each required field.
```

### Content Monitoring
```
Visit ABC News Australia and extract the top 5 breaking news headlines with their timestamps.
```

### Multi-Site Analysis
```
Compare flight prices from Sydney to Tokyo next week across Qantas, Jetstar, and Virgin Australia.
```

### Automated Verification
```
Check if our company is listed correctly on Google Maps, Yelp, and Yellow Pages, noting any discrepancies.
```

## Advanced Techniques

### Session Reuse
```
Create a browser session, log into LinkedIn, then search for "AI engineers in Melbourne" and extract the first 10 profiles.
```

### Parallel Operations
```
Create three browser sessions: monitor stock prices on ASX, check crypto on CoinSpot, and track forex on XE simultaneously.
```

### Sequential Workflows
```
Go to seek.com.au, search for "data scientist" jobs in Sydney, apply filters for $150k+, then extract job titles and companies.
```

## Optimization Tips

**Prompt Engineering:**
- Be specific about what to extract
- Name exact websites when possible
- Break complex tasks into steps
- Specify output format clearly

**Tool Selection:**
- Use multi-session only when needed
- Close sessions promptly
- Choose observe before act when possible
- Screenshot sparingly to save time

**Error Recovery:**
- Have fallback prompts ready
- Start simple, add complexity
- Watch for timeout warnings
- Monitor usage in dashboard

## Troubleshooting

**Connection Issues:**
- Verify API key and Project ID
- Check Browserbase service status
- Ensure NPX can download packages
- Restart Jan after configuration

**Browser Failures:**
- Some sites block automation
- Try different navigation paths
- Check if site requires login
- Verify target site is accessible

**Performance Problems:**
- Reduce concurrent sessions
- Simplify extraction requests
- Check remaining time quota
- Consider upgrading plan

**Model Struggles:**
- Too many tools overwhelm most models
- Claude 3.5+ Sonnet most reliable
- Reduce available tools if needed
- Use focused, clear instructions

<Callout type="info">
Browser automation is complex. Expect occasional failures and be prepared to adjust your approach.
</Callout>

## Browserbase vs Browser Use

| Feature | Browserbase | Browser Use |
|---------|-------------|-------------|
| **Infrastructure** | Cloud browsers | Local browser |
| **Setup Complexity** | API key only | Python environment |
| **Performance** | Consistent | System dependent |
| **Cost** | Usage-based | Free (local resources) |
| **Reliability** | High | Variable |
| **Privacy** | Cloud-based | Fully local |

## Next Steps

Browserbase MCP provides genuine browser automation capabilities, not just web search. This enables complex workflows like form filling, multi-site monitoring, and data extraction that would be impossible with traditional APIs.

The cloud infrastructure handles browser complexity while Jan maintains conversational privacy. Just remember: with great browser power comes occasional parsing errors.